import { Route, useNavigate } from "react-router-dom";

import About from "./pages/About";
import Home from "./pages/Home";

const App = () => {
  const navigate = useNavigate();
  return (
    <>
      <Route path="/" element={<Home />} />
      <Route path="/about" element={<About />} />

      <div>
        <button onClick={() => navigate("/about")}></button>
      </div>
    </>
  );
};

export default App;
